<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>2-随机数</title>
	</head>
	<body>
		<script type="text/javascript">
		//获取范围在[0,1)内的随机值
			console.log(Math.random());
			var z = Math.random();
			console.log(z);
			console.log(z.toFixed(3));
		</script>
	</body>
</html>
